package com.wnhz.work.yz.utils;

import android.app.Dialog;
import android.content.Context;
import android.support.design.widget.BottomSheetDialog;
import android.view.View;

/**
 * Created by d on 2016/12/29.
 */

public class MyDialog {

    public static void buttonDialog(Context context, View view){
        BottomSheetDialog dialog = new BottomSheetDialog(context);
        dialog.setContentView(view);
        dialog.setCancelable(true);
        dialog.setCanceledOnTouchOutside(true);
        dialog.show();
    }

    public static Dialog getButtonDialog(Context context, View view){
        BottomSheetDialog dialog = new BottomSheetDialog(context);
        dialog.setContentView(view);
        dialog.setCancelable(false);//下拉hide
        dialog.setCanceledOnTouchOutside(true);
        dialog.show();
        return dialog;
    }
}
